package helloPoint;

public class Point {
	double x;
	double y;
	double z;
	public Point(double px, double py,double pz){
		x=px;
		y=py;
		z=pz;
	}
	public void setX(double px){
		x=px;
	}
	public void setY(double py){
		y=py;
	}
	public void setZ(double pz){
		z=pz;
	}
	public double getX(){
		return x;
	}
	public double getY(){
		return y;
	}
	public double getZ(){
		return z;
	}
	public double distance(Point p){
		double x = getX();
		double y = getY();
		double z = getZ();
		return x*x+y*y+z*z;
	}
	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return this.getX()+"|"+this.getY()+"|"+this.getZ();
	}
}
